package com.etc.drug.mapper;

import com.etc.drug.entity.Drug;
import com.etc.drug.entity.OutBound;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;
import java.util.List;

@Mapper
public interface DrugMapper {
    //根据处方Id查询药品出库信息
    List<OutBound> queryByPId(String prescriptionId);

    int storage(String storageId, String drugId, Date drugValidity, Integer storageNum);

    int outbound(String outBoundId,String prescriptionId,String drugId,Date drugValidity, Integer outboundNum);

    List<Drug> queryDrugNum();

    Integer queryByOutboundId(String outboundId);

    Integer updateStatus(String outboundId, int statue);

    //根据出库Id查询处方Id
    String queryPrescriptionId(String outboundId);

    Integer count(String prescriptionId);

    List<Drug> queryCategory();

    Integer queryByNameAndVendor(String drugName, String drugVendor);

    Integer insert(Drug drug);

    Integer update(Drug drug);
}
